feat(proxy): support OAuth callers for Codex Live Voice - #1577
Conversation
|
To use Codex here, create an environment for this repo. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f807e55d62
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 26d657492b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ddddd6b463
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5959e764eb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…obal-policy # Conflicts: # tests/integration/test_migrations.py # tests/unit/test_db_migrate.py
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0bc228d88b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Traced the admission paths against main; the fail-closed properties hold up:
Two points that are owner calls rather than defects:
Interaction note: OAuth Live traffic carries |
|
Thanks for tracing the admission paths and calling out the owner decisions. I confirm the intended boundaries:
The PR description, user docs, change-level OpenSpec, and main |
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
The current-head CI completed with every code, test, migration, frontend, and Docker job green. The only failure was |
|
Maintainer decision on the keyless lane — thanks for the careful implementation (the fail-closed properties I traced earlier all hold, and the codex passes are clean), but as designed this can't merge: an unverified bearer plus an unverified Direction, in priority order:
In all variants the bar is the same: per-caller identity, per-caller limits, revocability, and attribution. A default-off global policy doesn't substitute for that bar; it only limits the blast radius of not having it. Two housekeeping notes: I'll rerun the transient |
|
To use Codex here, create an environment for this repo. |
|
Thanks — before rewriting the implementation, I would like to confirm the identity model and admission boundary with you. Client findingI tested the current official Codex Desktop build
The registered-key lane therefore does not currently cover the built-in Proposed OAuth identity modelI propose replacing the origin-gated anonymous OAuth scope with an explicitly enrolled and upstream-verified caller principal:
Successful credential validation would use a bounded, short-lived cache keyed by an HMAC token fingerprint. Raw bearer credentials would remain absent from persistence and logs. Limits, attribution, and revocation
Affinity, admission accounting, and request attribution would use this stable principal ID. Each OAuth caller record would be independently revocable and would have its own Live admission limits. This also provides a clean integration point for #1536 without assigning OAuth traffic an anonymous Before I implement this rewrite, could you confirm:
I will wait for your direction before changing the identity model or triggering further automated review. |
|
Thanks for the client testing — I verified the finding against the open-source client core, and it changes the conclusion rather than supporting it. The narrow observation is correct: with the built-in But "the registered-key lane does not cover the built-in
"Keep So option 1 from my previous comment appears satisfied by the current client. Two asks before we go further:
If the E2E fails against main for a reason we haven't identified, or if key distribution turns out to be operationally unacceptable for the target deployments, then your enrollment sketch is the right shape (per-caller record, upstream verification via the usage-identity path, stable
|
Summary
Support Codex Live Voice through codex-lb for both the built-in
openaiOAuth provider and registered Proxy API Key clients. OAuth callers use the zero-key origin boundary plus a Settings-managed upstream account pool, while account-stable ownership keeps call creation and every sideband route on the same serving account across OAuth bearer refreshes.Type of change
fix:— bug fix (no behavior change beyond the bug)feat:— new user-facing feature or capabilityrefactor:— internal refactor (no behavior change, no API change)docs:— documentation onlychore:/ci:/build:— tooling, CI, packagingtest:— test-only changeLinked issue: Related to #1492.
OpenSpec
Change directory:
openspec/changes/add-oauth-live-voice-auth/Capabilities:
realtime-api-compatdatabase-migrationsfrontend-architectureChanges
Live caller admission and stable ownership
sk-clb-*callers on strict Proxy API Key authentication, assignment, limits, attribution, and affinity.chatgpt-account-idon every OAuth Live request. The network boundary authorizes the caller; the locally unverified account header defines the ownership namespace.chatgpt-account-id. Bearer refresh therefore preserves the scope, while a changed account header or encryption key produces a different scope.Admitted clients presenting the same normalized account ID share one keyless ownership namespace and still need the bounded, high-entropy call ID to attach. Deployments requiring caller-level isolation use registered Proxy API Keys.
Policy and persistence
Capacity and registered-Key compatibility
api_key=None. Its sideband still acquires the normal Account stream lease, counts toward pool inflight, and obeys the serving Account's stream-capacity limit.Settings and client profiles
openaiOAuth profile and registered Proxy API Key profile, including both experimental realtime base URLs.Simplicity
CODEX_LB_*environment setting is added..env.exampleentry, dashboard navigation item, or dependency is addedTest plan
Local verification:
Manual Codex Desktop acceptance:
openaiOAuth providerBearer-rotation E2E used the real Codex Desktop client and an isolated local forwarding shim. Call creation reached the candidate with one bearer, the shim replaced the sideband bearer before forwarding, and codex-lb attached the sideband to the same call and serving account. The audible Live Voice response completed successfully; diagnostics retained only HMAC fingerprints.
Screenshots / output
Before
No OAuth Live policy control was available in Settings.
After
Settings exposes the default-off OAuth Live policy and compact upstream account selector.
Checklist
<type>(<scope>)?: <subject>).make ci-fastlocal gate.openspec validate --specs --strictpasses and the OpenSpec change is complete.